#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
int n;
cin >> n;
string s1, s2, s3;
cin >> s1 >> s2 >> s3;
int f = 0;
for (int i = 0; i < n; i++)
{
if ((s3[i] == s2[i] || s3[i] == s1[i]))
{
f = f + 1;
}
}
if (f == n)
{
cout << "NO" << endl;
}
else
cout << "YES" << endl;
}
}
Differences of the permutations | Doctor's Secret |
Back to School | I am Easy |
Teddy and Tweety | Partitioning binary strings |
Special sets | Smallest chosen word |
Going to office | Color the boxes |
Missing numbers | Maximum sum |
13 Reasons Why | Friend's Relationship |
Health of a person | Divisibility |
A. Movement | Numbers in a matrix |
Sequences | Split houses |
Divisible | Three primes |
Coprimes | Cost of balloons |
One String No Trouble | Help Jarvis! |
Lift queries | Goki and his breakup |
Ali and Helping innocent people | Book of Potion making |